using System;
using System.Collections;
using CE.Database;
/// <summary>
/// Summary description for UserProfileDB
/// </summary>
/// 
namespace CE.User
{
    public class LoginInformationDB
    {
        public LoginInformationDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(LoginInformation loginfo)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocUserLoginInformationInsertUpdateSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("UserInfoID", loginfo.UserInfoId);
            _sPara.Add("@LogHisId", loginfo.LogHisId);
            _sPara.Add("@CEID", loginfo.CEID);
            _sPara.Add("@UserTypeId", loginfo.UserTypeId);
            _sPara.Add("@Browser", loginfo.Browser);
            _sPara.Add("@MajorVersion", loginfo.MajorVersion);
            _sPara.Add("@MinorVersion", loginfo.MinorVersion);
            _sPara.Add("@BrowserType", loginfo.BrowserType);
            _sPara.Add("@BrowserVersion", loginfo.BrowserVersion);
            _sPara.Add("@IpAddress", loginfo.IpAddress);
            _sPara.Add("@HostName", loginfo.HostName);
            _sPara.Add("@DotNetVersion", loginfo.DotNetVersion);
            _sPara.Add("@JavaScript", loginfo.JavaScript);
            _sPara.Add("@VBScript", loginfo.VBScript);
            _sPara.Add("@Cookies", loginfo.Cookies);
            _sPara.Add("@Frames", loginfo.Frames);
            _sPara.Add("@Tables", loginfo.Tables);
            _sPara.Add("@JavaApplet", loginfo.JavaApplet);
            _sPara.Add("@ActivX", loginfo.ActivX);
            _sPara.Add("@Win16", loginfo.Win16);
            _sPara.Add("@Win32", loginfo.Win32);
            _sPara.Add("@Win64", loginfo.Win64);
            _sPara.Add("@Platform", loginfo.Platform);
            _sPara.Add("@UserAgent", loginfo.UserAgent);
            _sPara.Add("@Info1", loginfo.Info1);
            _sPara.Add("@Info2", loginfo.Info2);
            _sPara.Add("@Info3", loginfo.Info3);
            _sPara.Add("@Info4", loginfo.Info4);
            _sPara.Add("@Info5", loginfo.Info5);

            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }

    }
}